<?php
    $arr_estado = array(1 => 'Activo', 2 => 'Inactivo');
    //armar el array de planes.
?>
<header>
    <div class="title">
        <a href="">Cursos</a><span> > </span><strong>Borrar Curso</strong>
    </div>
    <div class="shortcuts">
        <a href=""></a>
    </div>
    <div class="help">
        <a href="">Ayuda</a>
    </div>
</header>
<div class="sidebar">
    <div id="group-delete" class="content">
        <h2>Borrar Curso</h2>
        <form id="group-delete-form" action="#" method="post" enctype="multipart/form-data">
            <input name="form-action" type="hidden" value="delete-group" />
            <div class="form-fields">
                <label>
                    <span class="name">Nombre:</span>
                    <input readonly type="text" id="group-delete-form-nombre" name="nombre" value="<?php if ($group->get('grupos','nombre')) echo html_entity_decode($group->get('grupos','nombre')); ?>" placeholder="Sin datos." />
                    <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                </label>
                <label>
                    <span class="name">Descripcion:</span>
                    <textarea disabled name='descripcion'><?php if ($group->get('grupos','descripcion')) echo html_entity_decode($group->get('grupos','descripcion')); ?> </textarea>
                    <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                </label>
                <label>
                    <span class="name">Estado:</span>
                    <input readonly type="text" id="group-delete-form-nombre" name="estado" value="<?php if ($group->get('grupos','estado')) echo $arr_estado[html_entity_decode($group->get('grupos','estado'))]; ?>" placeholder="Sin datos." />
                    <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                </label>
                <label>
                    <span class="name">Plan:</span>
                    <input readonly type="text" id="group-delete-form-nombre" name="plan" value="<?php if ($group->get('grupos','fk_plan')) echo html_entity_decode($group->get('grupos','fk_plan')); ?>" placeholder="Sin datos." />
                    <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                </label>
            </div>
            <?php if (count($arr_students)>0) { ?>
            <div class="form-fields">
                <?php foreach ($arr_students as $student) { ?>
                <label>
                    <img src="http://localhost/cov/sai//test/content/test-student-32x32.jpg" alt="" class="size-32x32" />
                    <span><?php echo $student['nombre']?> (<?php echo $student['email']; ?>)</span>
                </label>
                <?php } ?>
            </div>
            <?php } ?>
            <div class="alert alert-warning">
                <span class="icon warning"></span>
                <strong>Atención!</strong> - Estás a punto de dar de borrar éste grupo, <strong>esta opción no se puede deshacer</strong>.
            </div>
            <div class="form-buttons">
                <button type="submit" class="button important red"><span class="icon trash"></span> Borrar Grupo</button>
                <a class="button" href="<?php echo $host . 'groups/'; ?>"><span class="icon list"></span> Volver al listado</a>
            </div>
        </form>
    </div>
</div>